//
//  SWOrder.h
//  ChildStory
//
//  Created by linhan on 2017/1/19.
//  Copyright © 2017年 Aiya. All rights reserved.
//

#import <Mantle.h>

typedef NS_ENUM(NSInteger, SWOrderStatus) {
    unknow = -1,
    unpaid = 0,         //未支付
    purchased = 1,      //已经支付
    uploaded = 11,      //已经上传
    making = 2,         //生产中
    shipped = 3,        //已发货
    delivered = 4       //已签收
};



@interface SWAddresseeInfo : MTLModel
@property(nonatomic, assign) NSInteger  addressID;              //地址ID，下单时只传ID
@property(nonatomic, strong) NSString   *receiver;              //收件人
@property(nonatomic, strong) NSString  *phone;                  //手机
@property(nonatomic, strong) NSString  *provinceName;           //省份名称
@property(nonatomic, assign) NSInteger  provinceCode;           //省份编码
@property(nonatomic, strong) NSString  *cityName;               //城市名称
@property(nonatomic, assign) NSInteger  cityCode;               //城市编码
@property(nonatomic, strong) NSString  *districtName;           //区镇名称
@property(nonatomic, assign) NSInteger  districtCode;           //市区编码
@property(nonatomic, strong) NSString  *block;                  //镇街区
@property(nonatomic, strong) NSString  *postcode;               //邮编
@end


@interface SWOrder : MTLModel
@property(nonatomic, strong) NSString *orderID;             //订单
@property(nonatomic, strong) NSString *payID;               //凭借支付ID获取微信、支付宝支付参数
@property(nonatomic, strong) NSString *remark;              //附言
@property(nonatomic, strong) NSArray *products;
@property(nonatomic, strong) NSDate  *creationDate;
@property(nonatomic, assign) double  price;                 //价格
@property(nonatomic, assign) SWOrderStatus  status;        //订单状态
@property(nonatomic, strong) SWAddresseeInfo  *addresseeInfo;
@property(nonatomic, assign) BOOL finished;

@end



@interface SWProduct : MTLModel
@property(nonatomic, strong) NSString *productID;           //产品ID
@property(nonatomic, strong) NSString *title;               //产品名称
@property(nonatomic, assign) double  price;                 //价格
@property(nonatomic, assign) NSInteger  count;              //数量
@end



